package tableRelations.dao;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.query.Query;

import tableRelations.entity.Course;

public class CourseDAO extends BaseDAO<Course, Integer>{
	Session session = HibernateUtils.getSession();
	
	public List<Course> findByIdLessThen(Integer id){
		String hql="from Course t where t.id<?1";
		Query query = session.createQuery(hql);
		query.setParameter(1, id);
		return query.getResultList();
	}
}
